package com.zhijian.medical.entity.vo.response;

import com.zhijian.medical.enums.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Objects;

/**
 * 实验流程-样本管理 回显vo
 *
 * @author HCG
 * @version 1.0
 * @date 2022-08-18 15:35:15
 */
@Getter
@Api(tags = "实验流程-样本管理回显vo")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ExperimentProcessSampleVo implements Serializable {

    private static final long serialVersionUID = -1;

    /**
     * 主键id
     */
    @ApiModelProperty("主键id")
    private Long id;

    /**
     * 分子病理号
     */
    @ApiModelProperty("分子病理号")
    private String moleculePathologyNumber;

    /**
     * 常规病理号
     */
    @ApiModelProperty("常规病理号")
    private String conventionPathologyNumber;

    /**
     * 多个检测项目，1：KRAS/NRAS突变检测，2：BRAF突变检测
     */
    @ApiModelProperty("多个检测项目，1：KRAS/NRAS突变检测，2：BRAF突变检测")
    private String project;

    /**
     * 样本类型，0：蜡块，1：白片，2：外周血，3：骨髓，4：尿液，5：胸腹水，6：粪便，7：宫颈脱落细胞
     */
    @ApiModelProperty("样本类型，0：蜡块，1：白片，2：外周血，3：骨髓，4：尿液，5：胸腹水，6：粪便，7：宫颈脱落细胞")
    private String type;

    /**
     * 接收人员
     */
    @ApiModelProperty("接收人员")
    private String receiveUser;

    /**
     * 送检医院
     */
    @ApiModelProperty("送检医院")
    private String hospital;

    /**
     * 实验流程id
     */
    @ApiModelProperty("实验流程id")
    private Long experimentProcessId;

    /**
     * 状态，0：待检测，1：检测中，2：已检测
     */
    @ApiModelProperty("状态，0：待检测，1：检测中，2：已检测")
    private Byte status;

    /**
     * 状态字符串
     */
    @ApiModelProperty("状态字符串")
    private String statusStr;

    /**
     * 肿瘤细胞比例
     */
    @ApiModelProperty("肿瘤细胞比例")
    private String zlxbbl;

    /**
     * 备注
     */
    @ApiModelProperty("备注")
    private String note;

    /**
     * 是否合格，0：合格，1：不合格
     */
    @ApiModelProperty("是否合格，0：合格，1：不合格")
    private Byte weatherQualified;

    /**
     * 不合格原因
     */
    @ApiModelProperty("不合格原因")
    private String unqualifiedReason;

    /**
     * 关联类型
     */
    @ApiModelProperty("关联类型")
    private Byte relationType;

    /**
     * 关联id
     */
    @ApiModelProperty("关联id")
    private String relationId;

    /**
     * 姓名
     */
    @ApiModelProperty("姓名")
    private String name;

    /**
     * 性别，0：男，1：女
     */
    @ApiModelProperty("性别，0：男，1：女")
    private Byte sex;

    /**
     * 年龄
     */
    @ApiModelProperty("年龄")
    private Integer age;

    /**
     * 收到日期，格式'2022-01-01 11:11'
     */
    @ApiModelProperty("收到日期，格式'2022-01-01 11:11'")
    private String receiveDate;

    /**
     * 病区
     */
    @ApiModelProperty("病区")
    private String infectedPatch;

    /**
     * 科别
     */
    @ApiModelProperty("科别")
    private String kb;

    /**
     * 送检医生
     */
    @ApiModelProperty("送检医生")
    private String doctor;

    /**
     * 门诊号
     */
    @ApiModelProperty("门诊号")
    private String mzh;

    /**
     * 床号
     */
    @ApiModelProperty("床号")
    private String ch;

    /**
     * 住院号
     */
    @ApiModelProperty("住院号")
    private String zyh;

    /**
     * 实验内不合格原因
     */
    @ApiModelProperty("实验内不合格原因")
    private String inUnqualifiedReason;

    /**
     * 病史摘要
     */
    @ApiModelProperty("病史摘要")
    private String bszy;

    /**
     * 组织学病理诊断
     */
    @ApiModelProperty("组织学病理诊断")
    private String zzxblzd;

    /**
     * 取材明细
     */
    @ApiModelProperty("取材明细")
    private String qcmx;

    /**
     * 检验报告
     */
    @ApiModelProperty("检验报告")
    private String jybg;

    /**
     * 影像报告
     */
    @ApiModelProperty("影像报告")
    private String yxbg;

    /**
     * 总实验类型
     */
    @ApiModelProperty("总实验类型")
    private Byte mainType;

    /**
     * 总实验类型字符串
     */
    @ApiModelProperty("总实验类型字符串")
    private String mainTypeStr;

    /**
     * 浓度ng/ul
     */
    @ApiModelProperty("浓度ng/ul")
    private String nd;

    /**
     * OD260/280
     */
    @ApiModelProperty("OD260/280")
    private BigDecimal od260280;

    /**
     * OD260/230
     */
    @ApiModelProperty("OD260/230")
    private BigDecimal od260230;

    /**
     * 样本准备记录id
     */
    @ApiModelProperty("样本准备记录id")
    private Long readyId;

    /**
     * 核酸提取id
     */
    @ApiModelProperty("核酸提取id")
    private Long htstqId;

    /**
     * 稀释方式
     */
    @ApiModelProperty("稀释方式")
    private String xlfs;

    /**
     * 不符合要求样本处理方式
     */
    @ApiModelProperty("不符合要求样本处理方式")
    private String bfhyqybclfs;

    /**
     * 原数据id
     */
    @ApiModelProperty("原数据id")
    private Long fromId;

    /**
     * 创建时间
     */
    @ApiModelProperty("创建时间")
    private String createTime;

    /**
     * 修改时间
     */
    @ApiModelProperty("修改时间")
    private String updateTime;

    public void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    public void setXlfs(String xlfs) {
        this.xlfs = xlfs;
    }

    public void setBfhyqybclfs(String bfhyqybclfs) {
        this.bfhyqybclfs = bfhyqybclfs;
    }

    public void setReadyId(Long readyId) {
        this.readyId = readyId;
    }

    public void setHtstqId(Long htstqId) {
        this.htstqId = htstqId;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public void setMoleculePathologyNumber(String moleculePathologyNumber) {
        this.moleculePathologyNumber = moleculePathologyNumber;
    }

    public void setConventionPathologyNumber(String conventionPathologyNumber) {
        this.conventionPathologyNumber = conventionPathologyNumber;
    }

    public void setProject(String project) {
        this.project = project;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setReceiveUser(String receiveUser) {
        this.receiveUser = receiveUser;
    }

    public void setHospital(String hospital) {
        this.hospital = hospital;
    }

    public void setExperimentProcessId(Long experimentProcessId) {
        this.experimentProcessId = experimentProcessId;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public void setZlxbbl(String zlxbbl) {
        this.zlxbbl = zlxbbl;
    }

    public void setNote(String note) {
        this.note = note;
    }

    public void setWeatherQualified(Byte weatherQualified) {
        this.weatherQualified = weatherQualified;
    }

    public void setUnqualifiedReason(String unqualifiedReason) {
        this.unqualifiedReason = unqualifiedReason;
    }

    public void setRelationType(Byte relationType) {
        this.relationType = relationType;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setSex(Byte sex) {
        this.sex = sex;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public void setReceiveDate(String receiveDate) {
        this.receiveDate = receiveDate;
    }

    public void setInfectedPatch(String infectedPatch) {
        this.infectedPatch = infectedPatch;
    }

    public void setKb(String kb) {
        this.kb = kb;
    }

    public void setDoctor(String doctor) {
        this.doctor = doctor;
    }

    public void setMzh(String mzh) {
        this.mzh = mzh;
    }

    public void setCh(String ch) {
        this.ch = ch;
    }

    public void setZyh(String zyh) {
        this.zyh = zyh;
    }

    public void setInUnqualifiedReason(String inUnqualifiedReason) {
        this.inUnqualifiedReason = inUnqualifiedReason;
    }

    public void setBszy(String bszy) {
        this.bszy = bszy;
    }

    public void setZzxblzd(String zzxblzd) {
        this.zzxblzd = zzxblzd;
    }

    public void setQcmx(String qcmx) {
        this.qcmx = qcmx;
    }

    public void setJybg(String jybg) {
        this.jybg = jybg;
    }

    public void setYxbg(String yxbg) {
        this.yxbg = yxbg;
    }

    public void setMainType(Byte mainType) {
        this.mainType = mainType;
    }

    public void setMainTypeStr(String mainTypeStr) {
        if (Objects.isNull(this.mainType)) {
            this.mainTypeStr = null;
            return;
        }
        ExperimentTypeEnum anEnum = ExperimentTypeEnum.getByCode(Integer.valueOf(this.mainType));
        this.mainTypeStr = Objects.nonNull(anEnum) ? anEnum.getDesc() : null;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public void setNd(String nd) {
        this.nd = nd;
    }

    public void setOd260280(BigDecimal od260280) {
        this.od260280 = od260280;
    }

    public void setOd260230(BigDecimal od260230) {
        this.od260230 = od260230;
    }

    public void setStatusStr(String statusStr) {

        if (Objects.isNull(this.status)) {
            this.statusStr = null;
            return;
        }
        if (Objects.isNull(this.mainType)) {
            this.statusStr = null;
            return;
        }
        ExperimentTypeEnum anEnum = ExperimentTypeEnum.getByCode(Integer.valueOf(this.mainType));
        if (Objects.isNull(anEnum)) {
            this.statusStr = null;
            return;
        }
        switch (anEnum) {
            case PCR:
                PcrSampleStatusEnum pcrSampleStatusEnum = PcrSampleStatusEnum.getByCode(Integer.valueOf(this.status));
                this.statusStr = Objects.nonNull(pcrSampleStatusEnum) ? pcrSampleStatusEnum.getType() : null;
                break;
            case FISH:
                ExperimentFishSampleStatusEnum experimentFishSampleStatusEnum = ExperimentFishSampleStatusEnum.getByCode(Integer.valueOf(this.status));
                this.statusStr = Objects.nonNull(experimentFishSampleStatusEnum) ? experimentFishSampleStatusEnum.getType() : null;
                break;
            case SANGER:
                SangerSampleStatusEnum sangerSampleStatusEnum = SangerSampleStatusEnum.getByCode(Integer.valueOf(this.status));
                this.statusStr = Objects.nonNull(sangerSampleStatusEnum) ? sangerSampleStatusEnum.getType() : null;
                break;
            case NGS:
                NgsSampleStatusEnum ngsSampleStatusEnum = NgsSampleStatusEnum.getByCode(Integer.valueOf(this.status));
                this.statusStr = Objects.nonNull(ngsSampleStatusEnum) ? ngsSampleStatusEnum.getType() : null;
                break;
            default:
                this.statusStr = null;
                break;
        }
    }
}